package com.lebang.medicalInquiry.utils;

public class BytesToHex {
    public BytesToHex() {
    }

    public static String fromBytesToHex(byte[] resultBytes) {
        if (resultBytes == null) {
            return null;
        } else {
            StringBuilder builder = new StringBuilder();
            byte[] var2 = resultBytes;
            int var3 = resultBytes.length;

            for(int var4 = 0; var4 < var3; ++var4) {
                byte resultByte = var2[var4];
                if (Integer.toHexString(255 & resultByte).length() == 1) {
                    builder.append("0").append(Integer.toHexString(255 & resultByte));
                } else {
                    builder.append(Integer.toHexString(255 & resultByte));
                }
            }

            return builder.toString();
        }
    }
}
